Feature/194 optional agentic copilot scaffold for initialize novamodule nova init#209
Conversation
…e initialization - Introduced an optional Agentic Copilot setup during module initialization. - Updated documentation to reflect the new starter package options. - Enhanced interactive prompts to include Agentic Copilot configuration.
…ization - Implement Get-NovaModuleAgenticCopilotTemplateRoot function - Create AGENTS.md for Agentic Copilot workflow documentation - Add CHANGELOG.md and RELEASE_NOTE.md for version tracking - Introduce initial test coverage for Agentic Copilot scaffold sync
….instructions.md - remove outdated command from Sync-AgenticCopilotScaffold.psd1 - clarify testing policy instructions for script invocation
- Adjusted catch blocks to maintain consistent formatting - Improved readability by aligning else statements
Update generated architect/design guidance to use provider-neutral issue/work item wording and rely on the markdown-authoring skill instead of duplicating copy-safe fence rules.
- Add documentation for Nova-managed project expectations in starter guidance - Update contributing guidelines to reflect Nova build model and testing practices - Improve README with Nova project expectations and testing structure
Clarify Agentic Copilot starter guidance so generated projects stay on Nova workflows, generated dist output, PlatyPS help, source-mirrored tests, and strict ScriptAnalyzer behavior.
Require Agentic Copilot guidance and the generated starter scaffold to treat project.json Manifest.PowerShellHostVersion as the compatibility target for PowerShell code, tests, and examples.
Prompt for a project short name when Agentic Copilot is enabled so generated scaffold guidance can replace placeholders such as Invoke-<ShortName>*.
- Refine conversational flow for architect and design change prompts. - Clarify instructions for handling unresolved questions in design packages. - Adjust release notes and changelog formatting for consistency.
- Clarify conversational flow for new or not-yet-scoped work - Improve instructions for handling unresolved questions - Streamline guidance on implementing issues and design packages
- Add `/github-actions` to the list of directories - Clarify distinction between public PowerShell cmdlets and `% nova` CLI behavior
…dings - add instructions to fix ScriptAnalyzer findings before review or handoff - update README and contributing guidelines to reflect new requirements - clarify quality loop expectations in various documentation files
- Update documentation to require every changed or generated text file to end with exactly one trailing newline and no extra blank lines at the bottom. - Add instructions for reviewing file endings before handoff in multiple documentation files.
- Add reviewer agent content to improve review processes - Include implement prompt content for better implementation guidance - Update coding standards to clarify file and function ownership rules
- cleared all threshold definitions for improved clarity
- Introduce a best-effort code quality matrix for source and test files. - Define warning and alert thresholds to guide maintainability. - Provide authoring guidance to help shape code quality from the start.
…tion - Remove deprecated placeholders in command help paths - Enhance instructions for generating valid PlatyPS help - Clarify requirements for command help structure and validation
- Add detailed instructions for using PSScriptAnalyzer in the repository - Specify preferred entry points for analyzer runs - Emphasize the importance of fixing analyzer findings before handoff
…Tools - Adjust command help source paths in documentation and tests to reflect NovaModuleTools - Ensure consistency in PlatyPS help generation instructions
- Require matching help files for every new public entry point in the same change - Enhance instructions for generating valid PlatyPS help - Update documentation to reflect changes in help file requirements
- Add documentation for using Test-NovaBuild as the authoritative test entrypoint - Update instructions to prohibit direct Invoke-Pester calls in Nova-managed projects - Revise various documentation files to reflect the new testing policy
…tion - include scripts/**/*.ps1 in code quality matrix - refine PlatyPS help application path to docs/NovaModuleTools/**/*.md - add PSScriptAnalyzer module version to project.json
- Change default version from 0.0.1 to 0.1.0-preview in project files - Update expected version checks in tests to reflect new versioning
- Change default version from 0.0.1 to 0.1.0-preview in project files - Update expected version checks in tests to reflect new versioning
…and test design - Refactor maintainability guidance to emphasize source/helper-script quality - Update test design instructions to enhance clarity and coverage expectations
- Add new coding standards for private helper naming conventions - Update guidance to clarify public command naming and file structure rules - Refine generated guidance for project scaffolding and maintainability
- Clarify rules for function declarations in PowerShell files - Specify that private helpers should not declare nested functions - Enhance guidance on file/function ownership and support helpers
- Add non-blocking update warning for newer NovaModuleTools releases before interactive scaffold questions - Ensure existing .gitignore rules are preserved while adding Nova-managed entries - Update documentation to reflect new behavior in initialization workflows
- Refine private helper naming guidance to avoid public-style names - Clarify implementation-focused naming for private helpers
- update documentation to specify newline and blank line requirements - introduce Test-TextFileFormatting script to enforce formatting rules - add tests to validate text file formatting compliance
…ation - Add coverage target checks in Invoke-NovaTestWorkflow - Introduce functions for retrieving coverage settings from project configuration - Update project templates to include default Pester code coverage settings
…nfiguration - Refactor variable assignments for consistency - Update Pester configuration to ensure code coverage targets are applied correctly
…uilding-maintainable-code skill
- Move cross-cutting rules into .github/instructions/repository-conventions.instructions.md and slim copilot-instructions.md to a thin index with a task → prompt → agent → skills → instructions table - Generate AGENTS.md from copilot-instructions.md via Sync-AgenticCopilotScaffold.ps1 with a do-not-edit banner; remove AGENTS.md from scaffold-owned paths - Make scaffold TextReplacements code-fence-aware (skip fenced blocks and inline backticks) via new Split-AgenticContentByCodeFence and Invoke-AgenticInlineCodeAwareReplace helpers - Rename .github/skills/docs-site-html → docs-site to match the agent name and update references - Delete .github/prompts/markdown.prompt.md and fold its wrapper rules and example into the markdown-authoring skill - Normalize prompt headers and add an explicit "Invoke with @.github/prompts/<name>.prompt.md" line that names the delegated agent - Add "When unclear, ask before proceeding" clause to reviewer and release-manager agents - Replace the anchorless one-liner in code-quality-matrix.instructions.md with the ten concrete maintainability dimensions - Add tests/AgenticCopilotWiring.Tests.ps1 asserting /skill references, prompt → agent references, instruction applyTo: globs, and skill name/folder parity - Update scaffold-sync tests for the slim structure (new RepositoryConventions field, AGENTS.md banner assertion) and drop markdown.prompt.md from CoverageGaps expectations
- Move cross-cutting rules into .github/instructions/repository-conventions.instructions.md and slim copilot-instructions.md to a thin index with a task → prompt → agent → skills → instructions table - Generate AGENTS.md from copilot-instructions.md via Sync-AgenticCopilotScaffold.ps1 with a do-not-edit banner; remove AGENTS.md from scaffold-owned paths - Make scaffold TextReplacements code-fence-aware (skip fenced blocks and inline backticks) via new Split-AgenticContentByCodeFence and Invoke-AgenticInlineCodeAwareReplace helpers - Rename .github/skills/docs-site-html → docs-site to match the agent name and update references - Delete .github/prompts/markdown.prompt.md and fold its wrapper rules and example into the markdown-authoring skill - Normalize prompt headers and add an explicit "Invoke with @.github/prompts/<name>.prompt.md" line that names the delegated agent - Add "When unclear, ask before proceeding" clause to reviewer and release-manager agents - Replace the anchorless one-liner in code-quality-matrix.instructions.md with the ten concrete maintainability dimensions - Add tests/AgenticCopilotWiring.Tests.ps1 asserting /skill references, prompt → agent references, instruction applyTo: globs, and skill name/folder parity - Update scaffold-sync tests for the slim structure (new RepositoryConventions field, AGENTS.md banner assertion) and drop markdown.prompt.md from CoverageGaps expectations
…ents and documentation updates - Update design and review prompts for consistency in section naming - Introduce identifier replacement lists in scaffold content functions - Adjust documentation references to use project-specific naming conventions
- Refine instructions for step-by-step refactoring of unhealthy files - Remove redundant references to skills in various sections - Simplify language for better understanding in the guidelines
- Clarify workflow for generating help files by emphasizing the need to build and import the dist module first. - Update instructions to ensure correct metadata fields are populated in help files. - Add guidance on maintaining consistent naming conventions for external help files.
- Suppress progress output during Pester runs for cleaner logs - Update CodeCoverage settings in project.json for improved reporting - Refactor coverage configuration logic in GetNovaTestWorkflowContext
- increase coverage percent target from 75 to 80 - streamline parameter usage in test configuration
- change coverage percent target from 80 to 75 - refactor test cases for clarity and consistency
- change coverage percent target from 80 to 75 - refactor test cases for clarity and consistency
- Remove second Invoke-Pester run from Invoke-NovaModuleToolsCI.ps1; Test-NovaBuild now runs once and produces artifacts/coverage.xml - Remove Cobertura conversion helpers, SetSourcePath guard, and Get-CiPesterConfiguration/Get-CiTestPath functions from CI script - Update Invoke-CodeSceneAnalysis.ps1 to resolve artifacts/coverage.xml as the default JaCoCo coverage path instead of *.cobertura.xml - Upload coverage twice: --format jacoco --metric line-coverage and --metric branch-coverage - Add --format jacoco to cs-coverage check in check-coverage action - Update Tests.yml coverage-files glob to **/coverage.xml - Update CodeSceneAnalysis tests for JaCoCo double-upload behaviour - Update testing-policy instructions to document single-run JaCoCo flow
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
… clarity - Simplify test setup in InvokeNovaTestWorkflow.Tests.ps1 - Enhance error reporting for coverage target failures - Update README to clarify purpose of NovaModuleTools - Refactor AgenticCopilot scaffold functions for better readability
There was a problem hiding this comment.
Gates Passed
6 Quality Gates Passed
See analysis details in CodeScene
Absence of Expected Change Pattern
- NovaModuleTools/src/public/InvokeNovaRelease.ps1 is usually changed with: NovaModuleTools/src/public/PublishNovaModule.ps1
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
There was a problem hiding this comment.
Code Coverage Gates Failed
Overall Coverage: 0.0%
(required = 95%)
New & Changed Code Coverage: 0.0%
(required = 99%)
Review details by gate
-
Overall Coverage
-
Pass/Fail Reason:
The overall coverage gate was checked for all code and is too small: 0.0% covered < threshold = 95% -
Action:
Start by adding tests to the following files (optionally, exclude content from the coverage gates via CodeScene's configuration):src/private/cli/GetNovaCliArgumentRoutingState.ps1— 203 uncovered linessrc/private/cli/InvokeNovaCliCommandRoute.ps1— 185 uncovered linessrc/private/quality/InvokeNovaTestWorkflow.ps1— 162 uncovered linessrc/private/scaffold/InitializeNovaModuleAgenticCopilotScaffold.ps1— 159 uncovered linessrc/private/cli/FormatNovaCliCommandHelp.ps1— 143 uncovered lines
-
-
New & Changed Code Coverage
-
Pass/Fail Reason:
New or changed code lacks code coverage: 0.0% covered < threshold = 99% -
Action:
Add tests to:src/private/scaffold/InitializeNovaModuleAgenticCopilotScaffold.ps1— uncovered line(s) = [1-5,7-9,11-12,14-18,20-24,26-31,33-38,40-47,49-51,53-56...and 27 more.]src/private/quality/InvokeNovaTestWorkflow.ps1— uncovered line(s) = [19,21-27,35,44,68-69,85-89,91-95,97-102,104-105,107-112...and 20 more.]src/private/scaffold/UpdateNovaGitIgnore.ps1— uncovered line(s) = [1-3,5-14,16-20,22-24,26-29,31-33,35-36,38-42,44-46,48-49...and 16 more.]src/private/quality/GetNovaTestWorkflowContext.ps1— uncovered line(s) = [34,76-80,82-85,87-90,92-93,95-101,103-106,108-111,113-114,116-121...and 5 more.]src/private/scaffold/GetNovaModuleQuestions.ps1— uncovered line(s) = [1-7,9,12,15-18,23-25,27-29,48,50,90-101,103-111...and 2 more.]
-
Summary
Initialize-NovaModule/% nova initwith an optional Agentic Copilot starter package that scaffolds a filtered mirror of Nova's maintained agentic.github/guidance into newly created projects.Test-NovaBuildto measure code coverage against the builtdist/module instead of source files, and enforcesPester.CodeCoverage.CoveragePercentTargetfromproject.jsonwhen coverage is enabled.Remove-Item -Recurseprogress noise during% nova testby saving and restoring$global:ProgressPreferencearound the Pester run.Invoke-NovaModuleToolsCI.ps1now delegates entirely toTest-NovaBuild, removing the redundant secondInvoke-Pesterpass and the old Cobertura source-path remapping step.line-coverageandbranch-coveragein a single run.platyps-help.instructions.mdrules enforcing the build-then-import-first workflow and the module-name (not command-name)external help filefield.Initialize-NovaModule/nova init#194.Affected area
novaCLI or command routingproject.jsonhandlingREADME.md,CONTRIBUTING.md, repository workflow docs)docs/*.html)docs/NovaModuleTools/en-US/*.md)src/resources/example/project.json, workflow dependencies, release tooling)Review guidance
Start with these files:
src/public/InitializeNovaModule.ps1andsrc/private/scaffold/— the agentic Copilot prompt, answer collection, and scaffold writing logic; the newUpdateNovaGitIgnorehelper; and the pre-scaffold update-notification check.src/resources/agentic-copilot/— the full starter package tree that ships insidenova init; drift-tested bytests/AgenticCopilotScaffoldSync.Tests.ps1andtests/AgenticCopilotWiring.Tests.ps1.src/private/quality/GetNovaTestWorkflowContext.ps1andInvokeNovaTestWorkflow.ps1—Initialize-NovaPesterCoverageConfigurationforces coverage to run againstdist/and readsCoveragePercentTarget;$global:ProgressPreferenceis saved and restored around the Pesterrun.
scripts/build/ci/Invoke-NovaModuleToolsCI.ps1— singleTest-NovaBuildrun; secondInvoke-Pesterpass andCobertura*helpers removed.scripts/build/ci/Invoke-CodeSceneAnalysis.ps1— JaCoCo replacing Cobertura;line-coverageandbranch-coverageuploaded in sequence;artifacts/coverage.xmlauto-discovery..github/workflows/Tests.yml—coverage-filesglob updated to**/coverage.xml..github/instructions/platyps-help.instructions.md— new rules enforcing build-first import and module-nameexternal help file.Trade-offs and limitations:
Sync-AgenticCopilotScaffold.ps1and the drift test keep it aligned but must be re-run after significant guidance changes.CoveragePercentTargetenforcement applies only toTest-NovaBuild; directInvoke-Pestercalls bypass it.Invoke-NovaModuleToolsCI.ps1no longer producespester-junit.xml; onlyartifacts/novamoduletools-nunit.xmlandartifacts/coverage.xmlremain.Validation
Invoke-NovaBuildTest-NovaBuild./scripts/build/Invoke-ScriptAnalyzerCI.ps1./scripts/build/ci/Invoke-NovaModuleToolsCI.ps1% nova init— minimal and example flows with Agentic Copilot enabled and disabled)Validation notes:
Documentation and release follow-up
README.mdreviewed and updated if contributor workflow, architecture, CI, release, or automation changedCONTRIBUTING.mdreviewed and updated if contribution expectations or review guidance changedCHANGELOG.mdreviewed and updated if the change matters to users, maintainers, or contributorsRELEASE_NOTE.mdreviewed and updated if the change affects public cmdlet usage, CLI usage, configuration semantics, or migration expectationsdocs/NovaModuleTools/en-US/help updated if a public command or CLI behavior changeddocs/*.htmlupdated if end-user workflows or examples changedsrc/resources/example/reviewed and updated if the real-world project layout, package model, or upload workflow changedMaintainability, compatibility, and risk
Risk, rollout, or rollback notes:
Important
Do not use a public pull request to disclose a vulnerability before coordinated handling.
Use the private reporting path in
SECURITY.mdfor new security issues.